home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-03 / qbasicpg.zip / TO-1.BAS < prev    next >
BASIC Source File  |  1991-02-07  |  447b  |  20 lines

  1. ' TO-1.BAS
  2. ' This program demonstrates the TO keyword in a CASE clause.
  3.  
  4. CLS
  5.  
  6. INPUT "Please enter a name:  ", name$
  7. PRINT
  8.  
  9. SELECT CASE name$
  10.     CASE "a" TO "m"
  11.         PRINT "The name is in the range a to m."
  12.     CASE "m" TO "z"
  13.        PRINT "The name is in the range m to z."
  14.     CASE "A" TO "M"
  15.         PRINT "The name is in the range A to M."
  16.     CASE "M" TO "Z"
  17.         PRINT "The name is in the range M to Z."
  18. END SELECT
  19.  
  20.